package ps;

import javax.swing.UIManager;

import ps.client.gui.MainFrame;
import ps.server.ServerApp;


public class StartUp {
    
    private static final String PARAM_SERVER = "-server";

    public static void main(String[] args) {
        if (args.length >= 1 && args[0].equals(PARAM_SERVER)) {
            try {
                ServerApp server = new ServerApp();
                server.startWithTrayIcon();
            } catch (Exception ex) {
                ex.printStackTrace();
                System.exit(-1);
            }
        } else {
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            } catch (Exception ex) {
                ex.printStackTrace();
            }
            
            MainFrame mainFrame = new MainFrame();
            mainFrame.setVisible(true);
            mainFrame.showLogin();
        }
    }

}
